Skip to content

[WIP] Adapter: InferenceBench - #71

Open
zhumengzhiren wants to merge 7 commits into
harbor-framework:mainfrom
zhumengzhiren:inferencebench-adapter
Open

zhumengzhiren wants to merge 7 commits into
harbor-framework:mainfrom
zhumengzhiren:inferencebench-adapter

Conversation

@zhumengzhiren

@zhumengzhiren zhumengzhiren commented Nov 3, 2026 •

Copy link
Copy Markdown

Adds an adapter for InferenceBench (paper). It has 12 tasks (4 scenarios × 3 seed pairs). In each one, an agent deploys and optimizes an inference server for Mistral-7B-Instruct-v0.3 on one H100 within 2 hours. The score is the speedup over a naive PyTorch server.

No oracle trial has passed yet, so there is no pass evidence. On November 30 the reviewers ran the oracle for inferencebench-a-mistral-7b-21-1337 on a Modal H100 (comment): the hand-off reached the separate verifier and the judge passed, but the evaluation server could not start, because /tmp/xdg_cache belonged to root in that sandbox. a347976 fixes that; the fix has not run in a sandbox. I have not run anything on a GPU myself, because I have no H100 sandbox and no judge credential. The staged oracle pilot from the review is described below.

Status

Checked locally, without a GPU or a container runtime:

  • All 12 tasks generate from the pinned upstream commit, aisa-group/InferenceBench@108ec74.
  • The 121 unit tests pass with Harbor 0.25.0 and 0.26.0. At beb73ab, the hand-off's tests also passed with the image's Python 3.10, and the hand-off has not changed since. Each of 17 deliberate breaks of the hand-off, the environment record, and the scorer makes at least one test fail, and so does each of 15 deliberate breaks of the cache-directory change in a347976.
  • harbor lint (Harbor 0.26.0) reports only unpinned-image, for the base image in upstream's Dockerfile.
  • scripts/validate_adapter.py (the version on main) reports no errors and six warnings at ab82754. All six wait for the parity runs: the dataset and parity PR links, which are null until those PRs exist, the two run lists, the parity cost, and the reproduction commands.
  • collect.sh, test.sh, and agent_tmp.sh pass shellcheck. A unit test runs collect.sh and the hand-off step of test.sh from start to finish in a scratch tree, with stand-ins for the switch to user agent and for the model download, and checks that the agent's home comes back as the agent left it; others check that a missing or damaged hand-off gets no reward and that a pack that fails leaves no parts behind. The judge and evaluation steps of test.sh are unchanged since 4f3abbf, for which they ran from start to finish in seven cases; a347976 only adds the two calls that reset the cache directories before them.
  • The PyTorch reference script ran from start to finish on a CPU. It built its virtual environment from upstream's torch lock (all nine pinned versions), started upstream's unmodified server with a small public model, and scored eight made-up questions. This checks the plumbing, not the number; its check of the CUDA libraries needs a GPU.
  • The model download ran with the image's huggingface_hub release (1.12.0): it caches a pinned commit, and a lookup by name finds it offline.

Run by the reviewers on November 30 (comment):

  • The CPU check of the PyTorch reference path passed on their machine: the server started with a small public model, and all eight synthetic questions reached the scorer.
  • The H100 oracle for inferencebench-a-mistral-7b-21-1337 on Modal: Harbor moved the hand-off to the separate verifier, and the judge passed. vLLM, started as user agent, then stopped with Permission denied at /tmp/xdg_cache/vllm, so nothing was measured.
  • /review-adapter at a347976 (result): the structural validation reported two errors, the empty dataset and parity PR links, so the AI review was skipped.

Not run yet:

  • No oracle trial has finished. With the fix in a347976, the server start, the measurement, and the reward have still not run on a GPU.
  • I have not run anything in a sandbox myself (Docker, Daytona, or Modal), including that fix.
  • The quality reference is still the paper's 128/500. The run that measures it is ready.
  • Parity has not started.

Changes since beb73ab

Found by the reviewers' Modal run:

  • Cache directories in /tmp. Upstream's image points the caches of the agent's tools at /tmp: XDG_CACHE_HOME=/tmp/xdg_cache and six more variables. The original benchmark mounts a directory of the job's own user at /tmp and empties it before the final evaluation, so the agent and its server can always create those directories. A sandbox's /tmp comes with the image, and in the Modal sandbox /tmp/xdg_cache already existed as root's, so vLLM could not create its cache there. I could not find what created it: nothing in the Dockerfile or in the adapter's scripts writes to that path as root, so I suspect the image build or the sandbox's start. reset_cache_dirs (environment/agent_tmp.sh) now makes each of the seven an empty directory of user agent: in the healthcheck, before the agent's budget starts, and in test.sh, before the judge and again before the evaluation server. It touches only a name directly in /tmp and removes a symbolic link instead of following it. If it cannot replace a path, the healthcheck fails, or the trial ends without a reward, instead of a server that could not start being scored as 1×. The verifier's eval.log names what it replaced. The healthcheck does it too because a server that the agent starts in its own sandbox would stop at the same directory.

Found by /review-adapter:

  • Dataset and parity links. dataset_pr and parity_pr in parity_experiment.json were empty lists. The validator reports that as an error, and /review-adapter skips its AI review when the validation has an error. Those PRs can exist only after the parity runs, so ab82754 sets both to null, which the validator reports as a warning. The adapter's code does not read this file, so the generated tasks are the same as at a347976.

Changes from 4f3abbf to beb73ab

Requested in review:

  • Separate verifier. The tasks set environment_mode = "separate", so Harbor makes the verifier's sandbox from a copy of [environment]: the same image, GPU, resources, and variables. The evaluation restarts the agent's own server, so the agent's work is handed over:
    • collect.sh stops the agent's processes, removes known credential files, and packs /home/agent, and the /tmp targets of the task directory's links, into one tar stream in /var/lib/ib_handoff, which only root can write. task.toml declares the manifest and up to 40 parts of 2 GiB as artifacts. Harbor downloads each file on its own to the trial directory and uploads it to the same path in the verifier's sandbox, so no transfer passes through Harbor's directory archives or exceeds what Harbor can download from a Modal sandbox in one file (harbor#3924).
    • The model weights stay behind if the agent did not change them. The healthcheck records the files that it downloads, collect.sh checks each against the content hash that the Hub names it after, and the verifier downloads the pinned revision again (29 GB) and puts the unchanged files back. Hard links to them and copies of the weight files are recorded instead of packed.
    • test.sh checks the hand-off against its manifest, empties /home/agent, and pipes the stream to handoff.py unpack, which runs as user agent. It refuses members that would leave their destination, pass through a symbolic link, or link to anything but a file of the stream; clears set-user-ID bits; and sets directory modes last. The hand-off itself stays closed to user agent and the judge. A missing, damaged, or foreign hand-off gets no reward.
    • The trial directory keeps the hand-off, so the verifier has everything it needs to grade the trial again without the agent. Each part starts with a header that holds a NUL byte, so Harbor's secret scrubbing leaves the parts unchanged.
    • The job configurations and the README target Harbor 0.26.0.

Found while making the change:

  • Two sandboxes, two GPUs. The agent now tunes its server on one H100 and the verifier measures it on another, which can be a different variant or run a different driver. environment.json records the GPUs, memory, and driver of both sandboxes, whether they match, and whether both are H100s. If not, the verifier logs a warning and inferencebench-score lists the trial; it is graded all the same.

Changes from de70da2 to 4f3abbf

Requested in review:

  • The judge is a gate. The verifier writes reward.json only after the judge returned two valid verdicts. If the judge cannot run or fails three times, the trial is ungraded: the final evaluation still runs, as it does in run_task.sh, and ungraded.json keeps the reason and the measurement, but there is no reward file. Without a judge credential the verifier skips the evaluation, so a forgotten key does not cost hours of GPU time. The diagnostic mode is explicit: INFERENCE_BENCH_JUDGE=off measures the server and leaves the trial unscored. A judged run that fails a gate, ships no working server, or is flagged keeps the paper's 1×. inferencebench-score lists every trial as valid, failed (1×), ungraded, error, or reference; only the first two enter a mean, and it does not accept a reward whose judge_valid is not 1.
  • The oracle is judged. The oracle configurations no longer blank the judge's credentials, every configuration runs one trial at a time, and the README has the three stages of the pilot. inferencebench-score --pool scores the stages as one run.
  • Pins and records. The model repository is pinned to a commit. Each task has a manifest (upstream commit, model revision, seeds, timeouts, checksums of the lock files and samples). Before the judge and the evaluation, the verifier writes environment.json: GPU model, memory and driver, CPUs, memory, disk, the image's packages and CUDA toolkit, the packages that the server uses, the tokenizer's content hashes, the data checksums, and the judge's CLI version and model. It copies no credential and has five minutes, so a GPU that does not answer cannot hold up the verifier. Every judge attempt keeps its verdict files, and every evaluation attempt keeps its metrics.
  • Quality reference. --ae INFERENCE_BENCH_ORACLE=pytorch-reference recomputes the PyTorch reference inside a task's image as upstream's run_precompute_all_baselines.sh does for the torch backend: upstream's reference server and precompute_quality_baseline at concurrency 1, on the cached question set whose checksum the image build verifies. The packages of upstream's torch baseline container go into a virtual environment under upstream's lock, so that torch loads the CUDA libraries it was installed with, as in upstream's container; the run records the libraries that torch loaded and stops if any comes from elsewhere.

Found in my own reviews:

  • Oracle. vLLM 0.11.0 does not start with the transformers release that upstream's lock pins (5.4.0), because it reads a tokenizer attribute that transformers 5 removed. Upstream measures its vLLM baseline with its runtime shims (src/eval/inference/runtime_shims), and the oracle now loads the same shims. I reproduced the failure and the fix with transformers 5.4.0 and a copy of vLLM's function. At de70da2 the oracle would have failed on every task.
  • The agent's processes. The verifier stops user agent's processes with a checked, retried kill before root goes on. It takes ownership of /tests and /logs/verifier, starts the evaluation server and the judge with no_new_privs, and builds its requests from a copy of the tokenizer that only root can write. These still apply in the separate verifier, where the agent's server and the judge's CLI run as user agent.
  • Fidelity. The final evaluation no longer replays the environment of a server that the agent left running, and it no longer accepts a server that outlives its launcher. The original pipeline does neither. The parity agent follows upstream's wrapper: every CLI run stops at the deadline, there are at most three runs, and a failed resume starts a new session with the task prompt.
  • Scoring and provenance. inferencebench-score reads only Harbor's trial results and the verifier's own files, and it reports the aggregate only for a complete 4 × 3 run. The adapter refuses a modified copy of the pinned upstream checkout, and it records another checkout's commit with -dirty if its files differ.

Design notes

Oracle. Upstream ships no reference solution, and the score is an unbounded speedup. The oracle installs vLLM 0.11.0, uses upstream's untuned vllm_running launcher, and then goes through the same test.sh as an agent, including the judge. A trial passes if valid and judge_valid are 1. The paper's "vLLM default" row (A 1.25×, B 2.25×, C 48.69×, D 1.96×) is a sanity check, not a threshold.

Verifier. The final evaluation runs in a separate sandbox, which receives the agent's home through the trial directory; the "Separate verifier" note in the README describes the hand-off. Upstream's own adapter also uses a second sandbox, and passes /home/agent through a Modal volume. Two limits remain:

  • An agent that removes or renames its task directory keeps Harbor from running the collect hook, because Harbor runs it in that directory. The trial then has no hand-off and ends as an error without a reward, where the original would count a failed run (1×). The scorer names the trial and reports no aggregate.
  • The model weights are the agent's to change, as in the original pipeline; the judge reviews the task directory, so it does not see a change to the model cache.

Oracle pilot

One trial at a time with Harbor 0.26.0, on one H100 with 16 CPUs, 180 GB of memory, and 400 GB of disk per sandbox:

  1. The PyTorch quality reference (probably 1–2 H100-hours; the command allows 6).
  2. Scenario A, seed pair 21:1337 (about 1 H100-hour).
  3. Scenarios B, C, and D of that seed pair (about 4.5 H100-hours; scenario B alone takes about 3).
  4. The other two seed pairs (about 11 H100-hours).

The estimates for stages 2–4 assume the paper's vLLM default numbers, and each trial's verifier also spends a few minutes downloading the model. The commands are in the README under "Oracle pilot" and "Recomputing the PyTorch quality reference".

Generates the benchmark's 12 tasks from a pinned upstream commit. The oracle and parity have not been run yet.

Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
@audreina17

audreina17 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

The offline checks look good at de70da23: all 27 tests passed, all 12 tasks generated, and 156 evaluator and scenario files matched upstream. Could you fix the speedup calculation before starting the GPU pilot? A run can currently contribute a speedup without a valid judge verdict. Both valid and judge_valid should be 1 before the speedup enters the summary. An evaluated agent failure keeps upstream’s 1× score. If the judge failed or returned no verdict, please record an unscored attempt and its reason.

Let’s start with scenario A, seeds 21:1337, one H100, concurrency 1. Please use the normal launcher, restart, timing and integrity checks, and recompute the PyTorch quality baseline on the same 500 cached questions. What we need from this oracle is a complete, finite measurement with both validity flags set. Please save the launch config, machine and image versions, model and data revisions, and the logs and verdicts for each attempt. If that works, one seed per scenario is a useful next step before running the remaining cases.

…vironment

The verifier writes a reward only after the judge returns two valid
verdicts. Otherwise the trial is ungraded: ungraded.json keeps the
reason and the measurement, and the scorer counts it separately.
INFERENCE_BENCH_JUDGE=off runs an unscored diagnostic.

The oracle now loads upstream's vLLM runtime shims, without which it
failed on every task. Each trial records its environment in
verifier/environment.json, the model is pinned to a commit, and
INFERENCE_BENCH_ORACLE=pytorch-reference recomputes the quality
reference. Nothing has run on a GPU yet.

Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
@zhumengzhiren

Copy link
Copy Markdown
Author

Thanks for the careful review. 4f3abbf addresses it; the PR description lists every change. Nothing has run on a GPU yet, so the pilot is still ahead.

Judge gate. The verifier now writes reward.json only after the judge returned two valid verdicts. If the judge cannot run or fails three times, the trial is ungraded: the final evaluation still runs, as in run_task.sh, and ungraded.json keeps the reason and the measurement, but there is no reward file, so Harbor records the trial without a reward. Without a credential the verifier skips the evaluation, because such a trial can never be graded. The diagnostic mode is explicit: --ve INFERENCE_BENCH_JUDGE=off measures the server and leaves the trial unscored. A judged run that fails a gate, ships no working server, or is flagged keeps the 1× outcome. inferencebench-score lists each trial as valid, failed (1×), ungraded, error, or reference, counts each kind, and puts only the first two into a mean. It also rejects a reward whose judge_valid is not 1, so results from the old verifier are not accepted.

One case does not get the 1× outcome. If an agent removes or renames its task directory, Harbor cannot run the collect hook or the verifier, because it runs both in that directory. The trial ends as an error without a reward, where the original would count a failed run. The scorer names the trial and reports no aggregate. I do not see a fix inside the task, because the hook has no option for its working directory.

Oracle. The offline review could not show this: at de70da2 the oracle would have failed on every task. vLLM 0.11.0 does not start with the transformers release in upstream's lock, and upstream measures its vLLM baseline with runtime shims that the oracle did not load. It loads them now. The oracle is judged like any other run, and every configuration runs one trial at a time.

Pins and records. The model repository is pinned to commit c170c708. Each trial writes verifier/environment.json: GPU model, memory and driver, CPUs, memory, disk, the image's packages and CUDA toolkit, the server's packages, the tokenizer's content hashes, the data checksums, the judge's CLI version and model, and the task's manifest (upstream commit, seeds, timeouts, lock file checksums). Harbor's lock.json has the Harbor version and the resolved job. The image digest is not visible inside the sandbox, and the region only where the provider sets it, so I will copy both from the provider. Every judge attempt keeps its verdict files and every evaluation attempt keeps its metrics. Credentials come only from the host's environment, and I will search each job directory for their values before I share it.

Quality reference. --ae INFERENCE_BENCH_ORACLE=pytorch-reference recomputes it inside a task's image the way upstream's run_precompute_all_baselines.sh does for the torch backend: upstream's reference server and precompute_quality_baseline at concurrency 1, on the cached question set whose checksum the image build verifies. The packages of upstream's torch baseline container go into a virtual environment under its lock, so that torch loads the cuBLAS and cuDNN builds it was installed with rather than the base image's; the run records the loaded libraries and stops if any comes from elsewhere. I propose to run it first and to commit the measured value before the oracle runs. The original benchmark does not ship this number; each installation measures it. If the result is not 128/500, I would use the measured value for the gate and report both.

Proposed launch config

Harness harbor[daytona]==0.25.0, environment daytona (Modal works with inferencebench_modal.yaml)
Adapter this PR at 4f3abbf
Upstream aisa-group/InferenceBench@108ec747fab0bd92fd9de501f62157d074c50ed5
Model mistralai/Mistral-7B-Instruct-v0.3@c170c708c41dac9275d15a8fff4eca08d52bab71
Resources per trial 1 × H100 80 GB, 16 CPUs, 180 GB memory, 400 GB disk
Image built from the task's Dockerfile: nvidia/cuda:12.8.0-cudnn-devel-ubuntu22.04 and upstream's lock containers/locks/inference.txt
Job n_concurrent_trials: 1, n_attempts: 1, no retries, timeout_multiplier: 1.0
Timeouts agent 7200 s; verifier 43200 s, with the evaluation stopping at 41400 s; judge 3 × 15 min; server start 900 s; request 300 s (150 s in the last two of five evaluation attempts)
Judge Claude Code 2.1.258 from the image, claude-sonnet-4-6
Host environment DAYTONA_API_KEY, HF_TOKEN, ANTHROPIC_API_KEY (and ANTHROPIC_BASE_URL for a proxy)
(cd src/inferencebench && uv run inferencebench --output-dir ../../datasets/inferencebench)
ib_run() {
    uv run --project src/inferencebench --with 'harbor[daytona]==0.25.0' harbor run \
        -c src/inferencebench/inferencebench_daytona.yaml -p datasets/inferencebench "$@"
}
# 0. PyTorch quality reference; not judged, not a benchmark trial (probably 1-2 H100-hours)
ib_run -i inferencebench-a-mistral-7b-21-1337 --ae INFERENCE_BENCH_ORACLE=pytorch-reference \
    --ve INFERENCE_BENCH_JUDGE=off --agent-timeout-multiplier 3
# 1. Scenario A, seed pair 21:1337 (about 1 H100-hour)
ib_run -i inferencebench-a-mistral-7b-21-1337
# 2. Scenarios B, C, D of that seed pair (about 4.5 H100-hours)
ib_run -i 'inferencebench-[bcd]-mistral-7b-21-1337'
# 3. The other two seed pairs (about 11 H100-hours)
ib_run -x 'inferencebench-*-21-1337'
uv run --project src/inferencebench inferencebench-score --pool jobs/<job 1> jobs/<job 2> jobs/<job 3>

Each stage starts only after the one before it has passed, and a trial passes with valid = 1 and judge_valid = 1. The hour estimates for stages 1–3 assume the paper's vLLM default numbers; scenario B alone takes about 3 hours.

What blocks the pilot

  • GPU: I have no H100 access on Daytona or Modal. One H100 sandbox at a time is enough.
  • Judge: a credential for claude-sonnet-4-6. If you provide a proxy key, I also need its base URL.

Should the pilot run on Daytona or on Modal?

@audreina17

Copy link
Copy Markdown
Collaborator

On October 19, Harbor updated its new-task template to use a separate verifier by default. I noticed the tasks generated by this adapter still run the grader in the agent’s workspace. Could you switch them to a separate verifier and rerun the oracle on the latest stable Harbor release? Harbor #3712

If you find the full oracle run to be too costly time-wise or compute-wise, maybe you can start with rerunning one representative task? For that task, try the reference solution first, then with a submission you know is wrong. Once you are done, could you please share the task ID and both scores so we can check that the new verifier can grade submissions as expected?

If you’ve already run parity or in the middle of running parity, could you keep the original submissions, agent logs, and grading results, preferably in your Hugging Face fork? If only the grading environment changes and those files contain everything the verifier needs, we may be able to regrade the saved submissions without running the agents again.

Harbor's task template runs the verifier in its own sandbox by default
since harbor#3712, and the review asked the adapter to do the same.
Harbor now makes the verifier's sandbox from a copy of [environment],
and the agent's work reaches it through the trial directory.

collect.sh stops the agent's processes, removes known credential files,
and packs /home/agent and the /tmp targets of the task directory's
links into one tar stream in /var/lib/ib_handoff, which only root can
write. task.toml declares the manifest and up to 40 parts of 2 GiB as
artifacts, so Harbor moves each file on its own. Model files that the
healthcheck downloaded and the agent left unchanged, and hard links to
or copies of them, are recorded instead of packed; the verifier
downloads the pinned revision again and puts them back.

test.sh checks the hand-off and pipes the stream to handoff.py, which
unpacks it as user agent, refuses members that would leave their
destination or pass through a symbolic link, and keeps the hand-off
closed to the agent's processes and the judge. environment.json records
the GPUs of both sandboxes; a trial whose GPUs differ or are not H100s
is graded with a warning, and the scorer lists it. The configurations
target Harbor 0.26.0. Nothing has run on a GPU yet.

Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
A review of the separate verifier found three cases that the tests did
not cover.

If collect.sh cannot finish packing, it now removes the parts, so that
Harbor does not carry up to 80 GiB to a verifier that cannot use them.
A /tmp target that is a hard link to an unchanged model file is put
back as a copy: root keeps the /tmp snapshot for every server start,
and a hard link would let the agent's processes change it through the
file in the home. test.sh makes sure that the task directory exists
when it ends, because Harbor starts its later commands there, also
after a hand-off that could not be unpacked.

The tests now change a model file in place without changing its size,
which only the content hash detects, compare the whole home after the
end-to-end run, and check that a failed pack leaves no parts. The
README says which copies are recorded instead of packed and how to
search the stream for a credential.

Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
@audreina17

audreina17 commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

The CPU check for the oracle’s PyTorch reference path passed on our local machine. We started the PyTorch server with a small public model, sent it eight synthetic questions, and confirmed that all eight responses reached the scorer.

On Modal, we tried the H100 oracle for inferencebench-a-mistral-7b-21-1337. The separate verifier received the submission, and the integrity judge passed. When the verifier started vLLM as the agent user, vLLM hit Permission denied on /tmp/xdg_cache/vllm. We reproduced this in a fresh CPU sandbox using the same Modal image. /tmp/xdg_cache was already owned by root with mode 0755, so agent couldn’t create the vllm subdirectory. The server stopped before it could measure speed or quality.

We noticed that upstream gives each job a writable directory and mounts it at /tmp. Could we give the server a writable cache directory in the separate verifier too? That would let vLLM use its cache as agent even if the sandbox provider creates /tmp/xdg_cache as root.

We’ve only checked these permissions on Modal, and another sandbox provider could have the same issue. Would you be able to run the same task on a Daytona H100 and share the trial’s reward.json and environment.json? If it passes there with valid=1 and judge_valid=1, we’re happy to accept that result for this task and track the Modal issue separately.

The review ran the oracle for scenario A on a Modal H100. The hand-off
reached the separate verifier and the judge passed, but vLLM, started
as user agent, stopped with "Permission denied" at /tmp/xdg_cache/vllm:
/tmp/xdg_cache already existed in a fresh sandbox of that image, owned
by root with mode 0755.

Upstream's image points the caches of the agent's tools at /tmp
(XDG_CACHE_HOME and six more variables), and run_task.sh mounts a
directory of the job's own user there and empties it before the final
evaluation, so those directories can always be created. A sandbox's
/tmp comes with the image, and whatever ran as root with the image's
environment can leave one of them behind as root's.

reset_cache_dirs (agent_tmp.sh) now makes each of them an empty
directory of user agent: in the healthcheck, before the agent's budget
starts, and in test.sh before the judge and again before the
evaluation server. It only touches a name directly in /tmp, removes a
link instead of following it, and fails the healthcheck or leaves the
trial without a reward if it cannot replace a path. The verifier's
eval.log names what it replaced.

Not run in a sandbox: the tests run the function in a scratch tree
with a stand-in for chown.

Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
@zhumengzhiren

Copy link
Copy Markdown
Author

Thanks for running both checks, and for tracing the failure to the directory's owner. Yes: the server now gets writable cache directories, in both sandboxes. The fix is a347976.

Cause. Upstream's image sets XDG_CACHE_HOME=/tmp/xdg_cache and six more cache variables that point into /tmp. In the original benchmark, run_task.sh mounts a directory of the job's own user at /tmp and empties it before the final evaluation, so the server can always create those directories. In a sandbox, /tmp comes with the image, and the adapter relied on those paths being absent or the agent's. I could not find what created /tmp/xdg_cache as root: nothing in the Dockerfile or in the adapter's scripts writes to that path as root, so I suspect the image build or the sandbox's start on Modal. A server that an agent starts in its own sandbox would stop at the same directory, so this is not specific to the separate verifier.

Fix. reset_cache_dirs (environment/agent_tmp.sh) makes each of the seven directories an empty directory of user agent, which is how they start in the original. It runs in the healthcheck, before the agent's budget starts, and in test.sh, before the judge and again before the evaluation server. It touches only a name directly in /tmp and removes a symbolic link instead of following it. If it cannot replace a path, the healthcheck fails, or the trial ends without a reward, instead of a server that could not start being scored as 1×. The verifier's eval.log gets one replacing … line with the owner and mode of each directory that was in the way, so the next trial shows what the sandbox leaves there.

Checked. The 121 unit tests pass with Harbor 0.25.0 and 0.26.0. Three are new: two run the function in a scratch tree with a stand-in for chown, and one checks that both sandboxes call it for every /tmp variable of the image. Each of 15 deliberate breaks of the change makes a test fail. The fix has not run in a sandbox.

Daytona. I can't run that trial yet. I still have no Daytona or Modal access with an H100 and no judge credential, as in my comment of November 16. Who should I ask for a Daytona key and a judge key? Once I have them, I'll run inferencebench-a-mistral-7b-21-1337 on a Daytona H100 and post its reward.json and environment.json here. Until then, the Modal trial should get past the server start at a347976, if you can run it again.

@audreina17

Copy link
Copy Markdown
Collaborator

/review-adapter

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Structural validation of commit a347976 at 2026-12-01 04:00:04 UTC

Adapter contract v1 (docs/adapters.mdx).

❌ Adapter Validation: inferencebench

✅ 30 passed | ❌ 2 errors | ⚠️ 4 warnings

Errors (must fix)

  • ❌ Parity PR link empty: Entry 0: dataset_pr is an empty list. — src/inferencebench/parity_experiment.json:13
  • ❌ Parity PR link empty: Entry 0: parity_pr is an empty list. — src/inferencebench/parity_experiment.json:14

Warnings (recommended)

  • ⚠️ ADP-PARITY: insufficient runs: Entry 0, metric 0 (Aggregate speedup): original_runs needs at least two runs for sample SEM. A single published score does not satisfy the parity contract. — src/inferencebench/parity_experiment.json:21
  • ⚠️ ADP-PARITY: insufficient runs: Entry 0, metric 0 (Aggregate speedup): harbor_runs needs at least two runs for sample SEM. A single published score does not satisfy the parity contract. — src/inferencebench/parity_experiment.json:22
  • ⚠️ Metadata: parity_costs: parity_costs is missing or null — fill in a USD cost estimate when available (canonical format: a string such as $150). — src/inferencebench/adapter_metadata.json
  • ⚠️ Reproduction steps: Parity section should include reproduction commands in a code block. — src/inferencebench/README.md
Passed checks (30)
  • ✅ README.md exists
  • ✅ parity_experiment.json exists
  • ✅ adapter_metadata.json exists
  • ✅ src/inferencebench/ package exists
  • ✅ src/inferencebench/adapter.py exists
  • ✅ src/inferencebench/main.py exists
  • ✅ src/inferencebench/task-template/ directory exists
  • ✅ src/inferencebench/task-template/task.toml exists
  • ✅ src/inferencebench/task-template/instruction.md exists
  • ✅ src/inferencebench/task-template/environment/Dockerfile exists
  • ✅ src/inferencebench/task-template/tests/test.sh exists
  • ✅ src/inferencebench/task-template/solution/solve.sh exists
  • ✅ Template [task].name present
  • ✅ Template [task].authors present
  • ✅ parity_experiment.json is valid JSON array
  • ✅ adapter_metadata.json is valid JSON array
  • ✅ README section Overview present
  • ✅ README section What is present
  • ✅ README section Adapter Features present
  • ✅ README section Generated Task Structure present
  • ✅ README section Run Evaluation present
  • ✅ README section Usage present
  • ✅ README section Parity present
  • ✅ README section Notes & Caveats present
  • ✅ README section Installation / Prerequisites present
  • ✅ README section Citation present
  • ✅ README section Authors & Contributions present
  • ✅ Parity table column count correct
  • ✅ test.sh writes to reward path
  • ✅ No canary strings found

The dataset PR and the parity PR can exist only after the parity runs. The
validator reports an empty list for them as an error and null as a warning,
and /review-adapter skips its AI review when the validation has an error.
With null, the validation of this adapter passes with 0 errors and 6
warnings; it had 2 errors and 4 warnings.

Nothing in the adapter's code or in its generated tasks reads this file.

Signed-off-by: Yuanfan Chen <yuanfan0504@gmail.com>
@zhumengzhiren

Copy link
Copy Markdown
Author

The two errors are the dataset_pr and parity_pr links, which can exist only after the parity runs. Because of them, the run stopped after the structural validation and skipped the AI review (run 445).

ab82754 sets both links to null instead of an empty list. The contract's table lists them as string[]; null is the value that the validator on main reports as "fill in the PR URL(s)", a warning, so the validation now ends with 0 errors and 6 warnings and no longer stops the run before the AI review. All six warnings wait for the parity runs: the two links, the two run lists, parity_costs, and the reproduction commands in the README.

The commit changes only parity_experiment.json, which the adapter's code does not read, so the generated tasks are the same as at a347976. A Modal result at either commit applies to both.

I can't trigger /review-adapter myself, because the workflow runs it only for collaborators and contributors with a merged commit. Could you run it again? If you would rather keep the links as [] until parity, tell me and I'll revert.

Still open from my last comment: I have no Daytona key with an H100 and no judge key, so I can't run the Daytona trial yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants